import React from "react";
import ReactDOM from "react-dom/client";

// 第一步：从react-redux解构Provider组件
// 并且引入仓库实例
import { Provider } from "react-redux";

// import store from "./02-react-redux/store";
// import store from "./03-redux-todolist/store";
// import store from "./04-redux-async/store";
// import store from "./05-redux-async-saga/store";
// import store from "./06-redux-async-modules/store";
// import store from "./08-redux-immutable/store";
import store from "./09-rtk/store";

// import App from "./02-react-redux/App";
// import App from "./03-redux-todolist/App";
// import App from "./04-redux-async/App";
// import App from "./05-redux-async-saga/App";
// import App from "./06-redux-async-modules/App";
// import App from "./07-immutable/App";
// import App from "./08-redux-immutable/App";
import App from "./09-rtk/App";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  // <App />
  <Provider store={store}>
    <App />
  </Provider>
);

// store.subscribe(() => {
//   root.render(<App />);
// });
